<?php
$sql = "select * from ".$table_Prefix."term where term1 = '470' ";

$term_diy_res = mysql_query($sql);


?>

<?php
while ($term_diy = mysql_fetch_array($term_diy_res)) {
    ?>
    <li class="layui-form-item icon">

        <label class="layui-form-label" style="color:#f00">颜色-<?php echo $term_diy['name']?>：</label>

        <div class="layui-input-block">

            <input type="file" name="diy_file[<?php echo $term_diy['nid']?>]" />
            <span class="title-data">(请上传颜色-<?php echo $term_diy['name']?>的图片,格式为jpeg/png)</span>

            <?php
            $sql = "select * from ".$table_Prefix."diy_images  where term_id = '".$term_diy['nid']."' and product_id = '".$detail['nid']."' ";

            $diy_info_res = mysql_query($sql);

            $diy_info = mysql_fetch_array($diy_info_res);
            ?>
            <img src="<?
            if ($detail_storage) {
                //  echo $detail_storage;
            } else {
                //   echo $site_domin;
            }
            ?>/uploadfiles/<? echo $theme_folder ?>/<? echo  $diy_info['image_url'] ?>" width="100"/>

        </div>
    </li>

<?php }?>
